package com.wgts.wgts.control.viewpage;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.wgts.wgts.R;
import com.wgts.wgts.mvp.view.fragment.TimeAction;
import com.wgts.wgts.netmodle.resp.ActivityListEntity;

import java.util.List;

/*
 *
 *
 *   data:2018/9/1512:04
 *
 */public class TimeViewPageAdapter  extends FragmentStatePagerAdapter {

    private List<Fragment> fragments;
    private List<ActivityListEntity> list;
    private Context context;

    public TimeViewPageAdapter(Context context, FragmentManager fm, List<Fragment> fragments, List<ActivityListEntity> list) {
        super(fm);
        this.fragments = fragments;
        this.list = list;
        this.context = context;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments != null ? fragments.size() : 0;
    }
    /*@Override
    public CharSequence getPageTitle(int position) {
        //得到对应position的Fragment的title
        getTabView(position);
        return list.get(position).actionTime;
    }*/


}
